import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:untitled/pages/login_widget/SignUp/signup_widget.dart';
import 'package:untitled/pages/login_widget/commponents/background.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import 'package:untitled/pages/login_widget/commponents/login_screen.dart';

class Body extends StatefulWidget {
  const Body({Key? key}) : super(key: key);

  @override
  State<Body> createState() => _BodyState();
}

class _BodyState extends State<Body> {

  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return Background(
      child: SingleChildScrollView(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text(
              "WELCOME TO EDU",
              style: TextStyle(fontWeight: FontWeight.bold),
              ),
              SizedBox(height:size.height * 0.05),
              SvgPicture.asset(
                'assets/chat.svg',
                height:size.height*0.45
              ),
              SizedBox(height:size.height * 0.05),
              Container(
                width: size.width * 0.8,
                child: ClipRRect(
                  borderRadius: BorderRadius.circular(29),
                  child: FlatButton(
                    padding:EdgeInsets.symmetric(vertical: 15,horizontal: 40),
                    color: Colors.purple[400],
                    onPressed: (){
                      // Get.to(new LoginScreen());
                      Navigator.push(context, 
                      MaterialPageRoute(builder: (context){  //自带动画 向上滑动并淡出，推出相反
                        return LoginScreen();
                      }));

                    }, 
                    child: Text("LGIN",style: TextStyle(color: Colors.white),)
                    ),
                ),
              ),
              SizedBox(height: 20,),
               Container(
                width: size.width * 0.8,
                child: ClipRRect(
                  borderRadius: BorderRadius.circular(29),
                  child: FlatButton(
                    padding:EdgeInsets.symmetric(vertical: 15,horizontal: 40),
                    color: Colors.purple[50],
                    onPressed: (){
                       // Get.to(new LoginScreen());
                      Navigator.push(context, 
                      MaterialPageRoute(builder: (context){  //自带动画 向上滑动并淡出，推出相反
                        return SignUpScreen();
                      }));

                    }, 
                    child: Text("SINGUP",style: TextStyle(color: Colors.black),)
                    ),
                ),
              ),
            
          ],
        ),
      ),
    );
    
  }
}

